package com.guodexian.mapper;
import com.guodexian.entity.User;
import com.guodexian.ex.TelException;
import org.apache.ibatis.annotations.*;

/**
 * 类说明：<br>
 *
 * @author qfrx<br>
 * 2024/12/24 11:32<br>
 * @since 1.0 <br>
 */
@Mapper
public interface UserMapper {
    /**
     *  根据手机号查询用户，手机号具有唯一性，因而要么查询到一个，要么不存在
     * @param userTel
     * @return
     */
    @Select("select * from user_star where user_tel=#{userTel}")
    public User selectByTel(String userTel);
    @Insert({"insert into user_star(user_name,user_tel,user_pass) values(#{userName},#{userTel},#{userPass})"})
    int insert(User user);
    void reg(User user)throws TelException;
}
